home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
shells
/
kiss-0.11
/
kiss-0
/
kiss
/
src
/
dopwd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-23
|
377b
|
21 lines
#include "kiss.h"
int dopwd (Stringstack s)
{
register char
*cp;
if (s.nstr != 1)
error ("Bad commandline.\n"
"Usage: %s to print current working directory\n",
progname);
if (! (cp = getcwd (NULL, 0)) )
return (warning ("failure retrieving current working directory\n"));
printf ("%s\n", cp);
free (cp);
return (0);
}